<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
<title>Simulations for Statistical and Thermal Physics</title>

<link href="../../default.css" type="text/css" rel="stylesheet">

</head>

<body>

<h3 style="text-align:center;">Two-Dimensional Ising Model</h3>

<p class="header_title">Introduction</p>

<p>A Monte Carlo simulation of the two-dimensional Ising model using the Metropolis and Wolff algorithms. The output includes the mean energy, magnetization, susceptibility,
and the heat capacity. The instantaneous energy and magnetization are plotted as a function of time. See the one-dimensional Ising model for a discussion of the Metropolis algorithm.</p>

<center>
<applet
 code="org.opensourcephysics.davidson.applets.ApplicationApplet.class"
 archive="./stp.jar" codebase="../" align="top" height="40"
 hspace="0" vspace="0" width="150"> <param name="target"
 value="org.opensourcephysics.stp.ising.ising2d.Ising2DApp"> <param name="title"
 value="Applet"> <param name="singleapp" value="true">
</applet>
</center>

<p>&#160;&#160;&#160;&#160;One of the limitations of the Metropolis algorithm is the occurrence of <i>critical slowing down</i> near the critical temperature. The existence of critical slowing down is related to
the fact that the size of the correlated regions of spins becomes very large
near the critical point, and hence the time required for a region to lose
its coherence becomes very long if a <i>local</i> dynamics is used.</p>

<p>&#160;&#160;&#160;&#160;If we are interested only in the static properties of the Ising
model, the algorithm we use to sample the states is irrelevant as long as the
transition probability satisfies what is known as detailed balance. The <i>Wolff algorithm</i> flips a cluster of spins rather than a single spin, and is an example of a <i>global</i> algorithm. The utility of the Wolff algorithm is that it allows us to sample states efficiently near the critical temperature.</p>

<p>&#160;&#160;&#160;&#160;In the following we summarize the mean features of the Wolff algorithm. More details and its justification can be found in the references.</p>

<p>&#160;&#160;&#160;&#160;A naive definition of
a cluster of spins is that it corresponds to a domain of parallel nearest neighbor spins. We
can make this correspondence more general by introducing a bond between any two
parallel nearest neighbor spins. We assume that such a bond exists with probability p. For reasons that are discussed in the references, the naive definition of a cluster, which is equivalent to asuming that p = 1 must be replaced by a bond probability which depends on the temperature and is given by</p>
<p class="center">
p = 1 - e<sup>-2J/kT</sup>.
</p>

<p>&#160;&#160;&#160;&#160;The idea is to first generate a cluster of parallel spins with this bond probability and then flip the cluster with probability one. The algorithm can be summarized as follows.</p>

<ol>

<li>Choose a spin (the seed spin) at random. The nearest neighbor spins that are parallel to the seed site
are the perimeter spins.</li>

<li>Choose a perimeter spin and generate a random number r. If r &#8804; p, a bond exists between the
two spins, and the perimeter spin becomes part of the cluster. Otherwise, we do not test this bond again.</li>

<li>If a spin is added to the cluster, add its perimeter sites to the list of perimeter sites of the cluster.</li>

<li>Repeat steps (2) and (3) until no perimeter spins remain.</li>

<li>Flip all the spins in the cluster.</li>

</ol>
Note that bonds rather than sites
are tested so that a spin might have more than one chance to join a
cluster.

<p class="header_title">Problems</p>

<ol>

<li>Use the Metropolis algorithm and choose the linear dimension L = 32 and the temperature T = 2. Describe the nature of the spin configurations. Are there large correlated regions where the spins are parallel? Increase T to T = 4 and describe your observations.</li>

<li>Choose L = 4 and compute the mean magnetization, energy, susceptibility, and the specific heat as a function of temperature for T between 2.0 and 2.5 in steps of &#916;T = 0.05 
and plot your results. What evidence is there for a phase transition?</li>

<li>Repeat Problem 2 for L = 8, 16, and 32. Do the changes that you observe for larger L provide more 
evidence for a phase transition? If so, why?</li>

<li><i>Finite size scaling</i>. Compute the mean value of the absolute value of the
magnetization per spin |m|, the specific heat
C, and the susceptibility
&#967; at T = T<sub>c</sub> &#8773; 2.269 for L = 4, 8, 16, and 32. Use as many Monte Carlo steps per spin as
possible. Try both the Metropolis and Wolff algorithms and choose the algorithm which gives results that appear to converge more quickly. Plot the logarithm of |m| and
&#967; versus L and use the finite size scaling relations
|m| &#8733; L<sup>-&#946;/&#957;</sup> and &#967; &#8733; L<sup>-&#947;/&#957;</sup> to determine the critical
exponents &#946; and &#947;. Use the exact result
&#957; = 1.</li>

<li><i>Metastability and nucleation</i>. Use the Metropolis algorithm and choose L = 64, T = 1, and magnetic field H = 0.7. Run the simulation until the systems reaches equilibrium. You will notice that most of the spins are aligned (up) with the magnetic field. Pause the simulation and let H = -0.7; we say that we have "flipped" the field. Continue the simulation after the changed field and watch the configuration of spins. Do the spins align themselves with the magnetic field immediately after the flip? What is the equilibrium state of the system? You will probably notice that spins do not immediately flip to align themselves with the magnetic field. Instead most of the spins remain up and the mean values of the magnetization and energy do not change for many Monte Carlo steps per spin. We say that the system is in a <i>metastable</i> state. Why do the spins not flip as soon as the field is flipped? If you wait a while, you will see isolated "droplets" of spins pointing in the stable) (down) direction. If a droplet is too small, it will likely shrink and vanish. In contrast, if the droplet is bigger than a certain critical size, it will grow and the system will quickly reach its equilibrium state. If the droplet is a certain critical size, then it will grow with probability 50%. This droplet is called the <i>nucleating droplet</i>. The initial decay of the metastable state is called <i>nucleation</i>.</li>

<li>*Do a simulation at T = 10 until the number of up and down spins is approximately the same. Then change the temperature to T = 0.1 thus 
quenching your system. Step the simulation one Monte Carlo step per spin at a time and record the energy for each time step. A measure 
of the linear dimension of the domains that grow after the quench is given by R = 2/(2 + E/N). Plot log R versus 
the log of the time after the quench, and determine the functional form of your plot. If your plot is a straight line for 
long times, then the growth of R depends on time as a power law; the slope of the line is the power law exponent. If the growth of R follows a power law in the time, what is the exponent? Repeat 
for different system sizes and quench temperatures and determine if you always obtain approximately the same form for 
the domain growth.</li>

</ol>

<p class="header_title">References</p>

<ul>
<li>A discussion of the Wolff algorithm can be found at H. Gould, J. Tobochnik, and Wolfgang Christian, <i>An Introduction to Computer Simulation Methods</i> (Addison-Wesley, 2006), 3rd ed., pp. 646-649.</li> 
</ul>

<p class="header_title">Java Classes</p>

<ul>
<li>Ising2D</li>
<li>Ising2DApp</li>
</ul>

<p class = "small">Updated 8 May 2008.</p>
</body>
</html>
